package org.chinarjy.api;

import org.chinarjy.dto.PersonInfo;
import org.chinarjy.dto.ResultApi;

import java.util.List;

public interface PersonApi {
    //*****************************select操作*************************
    public ResultApi<List<PersonInfo>> getAllPersons();
    public ResultApi<PersonInfo> getPersonById(long id);
    public ResultApi<PersonInfo> getPersonByEmail(String email);
    public ResultApi<List<PersonInfo>> getPersonByName(String name);

    //*****************************insert操作*************************
    public ResultApi<PersonInfo> addPerson(PersonInfo personInfo);

    //*****************************delete操作*************************
    public ResultApi<PersonInfo> removePerson(PersonInfo personInfo);

    //*****************************update操作*************************
    public ResultApi<PersonInfo> updatePerson(PersonInfo personInfo);
}
